package com.example.administrator.orchardeveryday.utils;

import android.content.Context;

import com.example.administrator.orchardeveryday.BaseApp;

import java.io.File;

/**
 * Created by Administrator on 15-10-20.
 */
public class FileUtil {
    public static String getRootCache()
    {
        File externalCacheDir= BaseApp.getInstance().getExternalCacheDir();
        if(!externalCacheDir.exists())
        {
            externalCacheDir.mkdirs();
        }
        return externalCacheDir.getAbsolutePath();

    }
    public static File getImageCache()
    {
        String imageCache=getRootCache()+File.separator+AppConfig.APP_IMAGE_CACHE;
        File file=new File(imageCache);
        if(!file.exists())
        {
            file.mkdir();
        }
        return file;
    }


}
